#include <iostream>
using namespace std;
template<int &n> void sq(){
		    n *= n;
}

int something = 10;
int nothing = 10;

class tmp{

	public:
			tmp(){};
};

tmp t1=tmp();
tmp t2=tmp();

template <tmp &t> class tmptmp{
	public:
			tmptmp() {
			}
};


template <int &n> class Square{
		int _val;
	public:
			Square() :_val(n){
					n*=n;
				cout << n << endl;
			}
			void print(){cout << _val << endl;}
			int operator+(const Square& op2){
					return _val+op2._val;
			}
};

int main()
{
		    // cout << something << endl;
			 // sq<something>();
			 // cout << something << endl;

			sq<something>();
			cout << something << endl;
			something=2;
			Square<something> obj;
			Square<nothing> obj2;
			obj.print();
			// cout << obj2+obj << endl;

			tmptmp<t1> tmptmpt1;
			tmptmp<t2> tmptmpt2;
			return 0;
}
